home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / update~4.z / update~4 / lib_stdio_sprintf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  605 b   |  35 lines

  1. /*                s p r i n t f
  2.  *
  3.  * Formatted output to a string. A null character will be appended
  4.  * to the string to mark the end of string. The function returns
  5.  * the number of bytes written to the string (excluding the null
  6.  * character).
  7.  *
  8.  * Patchlevel 1.0
  9.  *
  10.  * Edit History:
  11.  */
  12.  
  13. #define __SRC__
  14. #include "stdiolib.h"
  15.  
  16. /*LINTLIBRARY*/
  17. /*VARARGS2*/
  18. /*ARGSUSED*/
  19.  
  20. char * sprintf(buf, fmt, va_alist)
  21.  
  22. char       *buf;                /* output buffer */
  23. CONST char *fmt;                /* format */
  24. va_dcl
  25.  
  26. {
  27.   va_list arg;                /* argument vector */
  28.  
  29.   va_start(arg);
  30.   (void)vsprintf(buf, fmt, arg);
  31.   va_end(arg);
  32.  
  33.   return buf;
  34. }
  35.